package com.wealth.scsj.b_app.view.fragment.threestatemodel;


import android.os.Bundle;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.wealth.scsj.b_app.R;
import com.wealth.scsj.b_app.adapter.OrderAdapter;
import com.wealth.scsj.b_app.bean.OrderBean;
import com.wealth.scsj.b_app.view.fragment.basemodel.BaseFragment;

import java.util.ArrayList;
import java.util.List;

/**
 * 进行中
 */
public class IngFragment extends BaseFragment {

    private List<OrderBean> orderBeanList;
    private OrderAdapter adapter;
    private RecyclerView order_rv;


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        View inflate = inflater.inflate(R.layout.fragment_ing, null);

        initView(inflate,null);
        initData();

        return inflate;
    }

    @Override
    protected void initView(View view, Bundle savedInstanceState) {

        order_rv = view.findViewById(R.id.order_rv);
        order_rv.setLayoutManager(new LinearLayoutManager(getHoldingActivity()));

    }

    @Override
    protected void initListener() {

    }

    @Override
    protected void initData() {

        orderBeanList = new ArrayList<>();
        for (int i = 0; i < 6; i++) {
            orderBeanList.add(new OrderBean("101","待骑手接单中","窦恺","151354548","中立七里湾","1.45","56","56","56","56","54343435433434","20180718","18:00"));
        }
        adapter = new OrderAdapter(getHoldingActivity(),orderBeanList);
        order_rv.setAdapter(adapter);
        adapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
            @Override
            public void onItemClick(BaseQuickAdapter adapter, View view, int position) {

            }
        });

    }

    @Override
    protected int getLayoutId() {
        return 0;
    }

}
